// 采购单的接口
import axiosp from '@/apis/axios/indexp.js'
const baseUrl = `/erp/bill`

// 
export function initAddBill(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/initAddBill`,
		method: 'post',
		data: params
	})
}


// 新增付款单
export function addData(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/addData`,
		method: 'post',
		data: params
	})
}
// 删除
export function deleteById(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/deleteById`,
		method: 'post',
		data: params
	})
}

// 编辑
export function updateData(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/updateData`,
		method: 'post',
		data: params
	})
}

// 根据id获取采购单信息
export function updateViewBillAndDetailsByBillId(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/viewBillAndDetailsByBillId`,
		method: 'post',
		data: params
	})
}

// 审核
export function audit(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/audit`,
		method: 'post',
		data: params
	})
}

// 作废
export function purchaseCancel(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/cancel`,
		method: 'post',
		data: params
	})
}

// 客户对账表
export function listDataGroupByCustomerPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/customer/listDataGroupByCustomerPage`,
		method: 'post',
		data: params
	})
}export function executePage(params) {
	return axiosp.request({
		url: `/erp/dynamicSql/executePage`,
		method: 'post',
		data: params
	})
}


// 客户对账表 - 单据
export function listBillsPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/customer/listBillsPage`,
		method: 'post',
		data: params
	})
}

// 供应商对账表
export function listDataGroupBySupplierPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/supplier/listDataGroupBySupplierPage`,
		method: 'post',
		data: params
	})
}
// 供应商对账表 - 单据
export function supplierListBillsPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/supplier/listBillsPage`,
		method: 'post',
		data: params
	})
}

// 加工商对账表
export function listDataGroupByProcessorPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/processor/listDataGroupByProcessorPage`,
		method: 'post',
		data: params
	})
}
// 加工商对账表 - 单据
export function processorListBillsPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/processor/listBillsPage`,
		method: 'post',
		data: params
	})
}

// 物流对账表
export function listDataGroupByTransporterPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/transporter/listDataGroupByTransporterPage`,
		method: 'post',
		data: params
	})
}
// 物流对账表 - 单据
export function transporterListBillsPage(params) {
	return axiosp.request({
		url: `/erp/reconciliation/transporter/listBillsPage`,
		method: 'post',
		data: params
	})
}

// 账户表
export function finAmountListPage_footing(params) {
	return axiosp.request({
		url: `/erp/log/finAmount/listPage_footing`,
		method: 'post',
		data: params
	})
}
// http://localhost:9533/api/erp/log/finAmount/listGroupByAccountPage
// http://localhost:9533/api/erp/log/finAmount/listGroupByAccountPageFooting
// 账户表 - 单据
export function finAmountListPage(params) {
	return axiosp.request({
		url: `/erp/log/finAmount/listPage`,
		method: 'post',
		data: params
	})
}

export function listGroupByAccountPage(params) {
	return axiosp.request({
		url: `/erp/log/finAmount/listGroupByAccountPage`,
		method: 'post',
		data: params
	})
}

export function listGroupByAccountPageFooting(params) {
	return axiosp.request({
		url: `/erp/log/finAmount/listGroupByAccountPageFooting`,
		method: 'post',
		data: params
	})
}